<template>
    <el-config-provider :locale="messages[locale]">
        <router-view />
    </el-config-provider>
</template>

<script setup lang="ts">
import { handleThemeStyle } from '@/utils/theme';
import en from 'element-plus/es/locale/lang/en';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import { nextTick, onMounted, computed } from 'vue';
import useAppStore from '@/store/modules/app';
import { useI18n } from 'vue-i18n';
const appStore = useAppStore();
const language = appStore.language;

/**
   * 根据语言标识读取对应的语言包
   */

const { locale, messages } = useI18n();

// const locale = computed(() => {
//     if (language === 'en') {
//         return en;
//     } else {
//         return zhCn;
//     }
// });
</script>
